import readline from "readline";

class ModelShell {
    protected shell = readline.createInterface({
        input: process.stdin,
        output: process.stdout,
        terminal: true,
        history: []
    });
    constructor() {
        this.setTitle("X@Net-OS")
        this.setPrompt("X@Net-OS> ")
    }
    public getShell (){
        return this.shell
    }
    public setTitle(title:string){
        process.title = title
    }
    public getTitle():string{
        return process.title
    }
    public setPrompt(prompt:string){
        this.shell.setPrompt(prompt);
    }
    public prompt(){
        this.shell.prompt();
    }
}
export default ModelShell